package com.weimengchao.core.http;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @description: 分页请求
 * @author: 魏孟超
 * @createDate: 2021-09-27 21:39
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@Builder
@ApiModel(description = "分页")
public class PageRequest implements Serializable {

    @NotBlank(message = "页码 不能为空")
    @ApiModelProperty(value = "页码", example = "", position = 0, required = true)
    private Integer pageNo = 1;

    @NotBlank(message = "每页显示大小 不能为空")
    @ApiModelProperty(value = "每页显示大小", example = "", position = 1, required = true)
    private Integer pageSize = 10;

}
